Skip to contentMethod: create(Collection, Token)
      1: package de.fhdw.wtf.common.exception.referencer;
2: 
3: import java.util.Collection;
4: 
5: import de.fhdw.wtf.common.ast.Constructor;
6: import de.fhdw.wtf.common.constants.referencer.ExceptionConstans;
7: import de.fhdw.wtf.common.token.Token;
8: 
9: /**
10:  * A Method of the {@link de.fhdw.wtf.walker.tasks.ConstructorReferencer} throws it.
11:  * 
12:  */
13: public final class DuplicateConstructorException extends ReferencerException {
14:         
15:         /**
16:          * Constructor of {@link DuplicateConstructorException}.
17:          * 
18:          * @param duplicateConstructors
19:          *            the duplicate constructors found.
20:          * 
21:          * @param token
22:          *            token
23:          */
24:         private DuplicateConstructorException(final Collection<Constructor> duplicateConstructors, final Token token) {
25:                 super(token, ExceptionConstans.DUPLICATE_CONSTRUCOR_MESSAGE + duplicateConstructors);
26:         }
27:         
28:         /**
29:          * Creates a {@link DuplicateConstructorException}-Object.
30:          * 
31:          * @param duplicateConstructors
32:          *            the duplicate constructors found.
33:          * @param token
34:          *            token
35:          * @return The {@link DuplicateConstructorException}-Object.
36:          */
37:         public static DuplicateConstructorException create(final Collection<Constructor> duplicateConstructors,
38:                         final Token token) {
39:                 return new DuplicateConstructorException(duplicateConstructors, token);
40:         }
41:         
42: }